$(function() {
	$("#pageData").text(
		"{if !data.firstPage}"+
		"<a href=\"javascript:\" onclick=\"loadDataWithPage(\${data.pageNumber--})\">上一页</a>" +
		"{/if}" +
		"{if !data.lastPage}" +
		"<a href=\"javascript:\" onclick=\"loadDataWithPage(\${data.pageNumber++})\">下一页</a>" +
		"{/if}");
});

function convertData(data, output, model) {
	var result = TrimPath.processDOMTemplate(model, data);
	var myTemplateObj = TrimPath.parseDOMTemplate(model);
	var result = myTemplateObj.process(data);
	document.getElementById(output).innerHTML = result;
}